export const continents = [
  'Europe',
  'Asia',
  'North America',
  'South America',
  'Africa',
  'Oceania',
];

export const countryData = {
  ABW: { country: 'Aruba', continent: 'North America' },
  AFG: { country: 'Afghanistan', continent: 'Asia' },
  AGO: { country: 'Angola', continent: 'Africa' },
  ALB: { country: 'Albania', continent: 'Europe' },
  AND: { country: 'Andorra', continent: 'Europe' },
  ARE: { country: 'United Arab Emirates', continent: 'Asia' },
  ARG: { country: 'Argentina', continent: 'South America' },
  ARM: { country: 'Armenia', continent: 'Asia' },
  ASM: { country: 'American Samoa', continent: 'Oceania' },
  ATG: { country: 'Antigua and Barbuda', continent: 'North America' },
  AUS: { country: 'Australia', continent: 'Oceania' },
  AUT: { country: 'Austria', continent: 'Europe' },
  AZE: { country: 'Azerbaijan', continent: 'Asia' },
  BDI: { country: 'Burundi', continent: 'Africa' },
  BEL: { country: 'Belgium', continent: 'Europe' },
  BEN: { country: 'Benin', continent: 'Africa' },
  BFA: { country: 'Burkina Faso', continent: 'Africa' },
  BGD: { country: 'Bangladesh', continent: 'Asia' },
  BGR: { country: 'Bulgaria', continent: 'Europe' },
  BHR: { country: 'Bahrain', continent: 'Asia' },
  BHS: { country: 'Bahamas, The', continent: 'North America' },
  BIH: { country: 'Bosnia and Herzegovina', continent: 'Europe' },
  BLR: { country: 'Belarus', continent: 'Europe' },
  BLZ: { country: 'Belize', continent: 'North America' },
  BMU: { country: 'Bermuda', continent: 'North America' },
  BOL: { country: 'Bolivia', continent: 'South America' },
  BRA: { country: 'Brazil', continent: 'South America' },
  BRB: { country: 'Barbados', continent: 'North America' },
  BRN: { country: 'Brunei Darussalam', continent: 'Asia' },
  BTN: { country: 'Bhutan', continent: 'Asia' },
  BWA: { country: 'Botswana', continent: 'Africa' },
  CAF: { country: 'Central African Republic', continent: 'Africa' },
  CAN: { country: 'Canada', continent: 'North America' },
  CHE: { country: 'Switzerland', continent: 'Europe' },
  CHI: { country: 'Channel Islands', continent: 'Europe' },
  CHL: { country: 'Chile', continent: 'South America' },
  CHN: { country: 'China', continent: 'Asia' },
  CIV: { country: "Cote d'Ivoire", continent: 'Africa' },
  CMR: { country: 'Cameroon', continent: 'Africa' },
  COD: { country: 'Congo, Dem. Rep.', continent: 'Africa' },
  COG: { country: 'Congo, Rep.', continent: 'Africa' },
  COK: { country: 'Cook Islands', continent: 'Oceania' },
  COL: { country: 'Colombia', continent: 'South America' },
  COM: { country: 'Comoros', continent: 'Africa' },
  CPV: { country: 'Cabo Verde', continent: 'Africa' },
  CRI: { country: 'Costa Rica', continent: 'North America' },
  CUB: { country: 'Cuba', continent: 'North America' },
  CUW: { country: 'Curacao', continent: 'North America' },
  CYM: { country: 'Cayman Islands', continent: 'North America' },
  CYP: { country: 'Cyprus', continent: 'Europe' },
  CZE: { country: 'Czechia', continent: 'Europe' },
  DEU: { country: 'Germany', continent: 'Europe' },
  DJI: { country: 'Djibouti', continent: 'Africa' },
  DMA: { country: 'Dominica', continent: 'North America' },
  DNK: { country: 'Denmark', continent: 'Europe' },
  DOM: { country: 'Dominican Republic', continent: 'North America' },
  DZA: { country: 'Algeria', continent: 'Africa' },
  ECU: { country: 'Ecuador', continent: 'South America' },
  EGY: { country: 'Egypt', continent: 'Africa' },
  ERI: { country: 'Eritrea', continent: 'Africa' },
  ESP: { country: 'Spain', continent: 'Europe' },
  EST: { country: 'Estonia', continent: 'Europe' },
  ETH: { country: 'Ethiopia', continent: 'Africa' },
  FIN: { country: 'Finland', continent: 'Europe' },
  FJI: { country: 'Fiji', continent: 'Oceania' },
  FRA: { country: 'France', continent: 'Europe' },
  FRO: { country: 'Faroe Islands', continent: 'Europe' },
  FSM: { country: 'Micronesia', continent: 'Oceania' },
  GAB: { country: 'Gabon', continent: 'Africa' },
  GBR: { country: 'United Kingdom', continent: 'Europe' },
  GEO: { country: 'Georgia', continent: 'Asia' },
  GHA: { country: 'Ghana', continent: 'Africa' },
  GIN: { country: 'Guinea', continent: 'Africa' },
  GMB: { country: 'Gambia, The', continent: 'Africa' },
  GNB: { country: 'Guinea-Bissau', continent: 'Africa' },
  GNQ: { country: 'Equatorial Guinea', continent: 'Africa' },
  GRC: { country: 'Greece', continent: 'Europe' },
  GRD: { country: 'Grenada', continent: 'North America' },
  GRL: { country: 'Greenland', continent: 'North America' },
  GTM: { country: 'Guatemala', continent: 'North America' },
  GUM: { country: 'Guam', continent: 'Oceania' },
  GUY: { country: 'Guyana', continent: 'South America' },
  HKG: { country: 'Hong Kong', continent: 'Asia' },
  HND: { country: 'Honduras', continent: 'North America' },
  HRV: { country: 'Croatia', continent: 'Europe' },
  HTI: { country: 'Haiti', continent: 'North America' },
  HUN: { country: 'Hungary', continent: 'Europe' },
  IDN: { country: 'Indonesia', continent: 'Asia' },
  IMN: { country: 'Isle of Man', continent: 'Europe' },
  IND: { country: 'India', continent: 'Asia' },
  IRL: { country: 'Ireland', continent: 'Europe' },
  IRN: { country: 'Iran', continent: 'Asia' },
  IRQ: { country: 'Iraq', continent: 'Asia' },
  ISL: { country: 'Iceland', continent: 'Europe' },
  ISR: { country: 'Israel', continent: 'Asia' },
  ITA: { country: 'Italy', continent: 'Europe' },
  JAM: { country: 'Jamaica', continent: 'North America' },
  JOR: { country: 'Jordan', continent: 'Asia' },
  JPN: { country: 'Japan', continent: 'Asia' },
  KAZ: { country: 'Kazakhstan', continent: 'Asia' },
  KEN: { country: 'Kenya', continent: 'Africa' },
  KGZ: { country: 'Kyrgyzstan', continent: 'Asia' },
  KHM: { country: 'Cambodia', continent: 'Asia' },
  KIR: { country: 'Kiribati', continent: 'Oceania' },
  KNA: { country: 'St. Kitts and Nevis', continent: 'North America' },
  KOR: { country: 'South Korea', continent: 'Asia' },
  KWT: { country: 'Kuwait', continent: 'Asia' },
  LAO: { country: 'Laos', continent: 'Asia' },
  LBN: { country: 'Lebanon', continent: 'Asia' },
  LBR: { country: 'Liberia', continent: 'Africa' },
  LBY: { country: 'Libya', continent: 'Africa' },
  LCA: { country: 'St. Lucia', continent: 'North America' },
  LIE: { country: 'Liechtenstein', continent: 'Europe' },
  LKA: { country: 'Sri Lanka', continent: 'Asia' },
  LSO: { country: 'Lesotho', continent: 'Africa' },
  LTU: { country: 'Lithuania', continent: 'Europe' },
  LUX: { country: 'Luxembourg', continent: 'Europe' },
  LVA: { country: 'Latvia', continent: 'Europe' },
  MAC: { country: 'Macao SAR, China', continent: 'Asia' },
  MAF: { country: 'St. Martin (French part)', continent: 'North America' },
  MAR: { country: 'Morocco', continent: 'Africa' },
  MCO: { country: 'Monaco', continent: 'Europe' },
  MDA: { country: 'Moldova', continent: 'Europe' },
  MDG: { country: 'Madagascar', continent: 'Africa' },
  MDV: { country: 'Maldives', continent: 'Asia' },
  MEX: { country: 'Mexico', continent: 'North America' },
  MHL: { country: 'Marshall Islands', continent: 'Oceania' },
  MKD: { country: 'North Macedonia', continent: 'Europe' },
  MLI: { country: 'Mali', continent: 'Africa' },
  MLT: { country: 'Malta', continent: 'Europe' },
  MMR: { country: 'Myanmar', continent: 'Asia' },
  MNE: { country: 'Montenegro', continent: 'Europe' },
  MNG: { country: 'Mongolia', continent: 'Asia' },
  MNP: { country: 'Northern Mariana Islands', continent: 'Oceania' },
  MOZ: { country: 'Mozambique', continent: 'Africa' },
  MRT: { country: 'Mauritania', continent: 'Africa' },
  MUS: { country: 'Mauritius', continent: 'Africa' },
  MWI: { country: 'Malawi', continent: 'Africa' },
  MYS: { country: 'Malaysia', continent: 'Asia' },
  NAM: { country: 'Namibia', continent: 'Africa' },
  NCL: { country: 'New Caledonia', continent: 'Oceania' },
  NER: { country: 'Niger', continent: 'Africa' },
  NGA: { country: 'Nigeria', continent: 'Africa' },
  NIC: { country: 'Nicaragua', continent: 'North America' },
  NIU: { country: 'Niue', continent: 'Oceania' },
  NLD: { country: 'Netherlands', continent: 'Europe' },
  NOR: { country: 'Norway', continent: 'Europe' },
  NPL: { country: 'Nepal', continent: 'Asia' },
  NRU: { country: 'Nauru', continent: 'Oceania' },
  NZL: { country: 'New Zealand', continent: 'Oceania' },
  OMN: { country: 'Oman', continent: 'Asia' },
  PAK: { country: 'Pakistan', continent: 'Asia' },
  PAN: { country: 'Panama', continent: 'North America' },
  PER: { country: 'Peru', continent: 'South America' },
  PHL: { country: 'Philippines', continent: 'Asia' },
  PLW: { country: 'Palau', continent: 'Oceania' },
  PNG: { country: 'Papua New Guinea', continent: 'Oceania' },
  POL: { country: 'Poland', continent: 'Europe' },
  PRI: { country: 'Puerto Rico', continent: 'North America' },
  PRK: { country: 'North Korea', continent: 'Asia' },
  PRT: { country: 'Portugal', continent: 'Europe' },
  PRY: { country: 'Paraguay', continent: 'South America' },
  PSE: { country: 'West Bank and Gaza', continent: 'Asia' },
  PYF: { country: 'French Polynesia', continent: 'Oceania' },
  QAT: { country: 'Qatar', continent: 'Asia' },
  ROU: { country: 'Romania', continent: 'Europe' },
  RUS: { country: 'Russia', continent: 'Europe' },
  RWA: { country: 'Rwanda', continent: 'Africa' },
  SAU: { country: 'Saudi Arabia', continent: 'Asia' },
  SDN: { country: 'Sudan', continent: 'Africa' },
  SEN: { country: 'Senegal', continent: 'Africa' },
  SGP: { country: 'Singapore', continent: 'Asia' },
  SLB: { country: 'Solomon Islands', continent: 'Oceania' },
  SLE: { country: 'Sierra Leone', continent: 'Africa' },
  SLV: { country: 'El Salvador', continent: 'North America' },
  SMR: { country: 'San Marino', continent: 'Europe' },
  SOM: { country: 'Somalia', continent: 'Africa' },
  SRB: { country: 'Serbia', continent: 'Europe' },
  STP: { country: 'Sao Tome and Principe', continent: 'Africa' },
  SUR: { country: 'Suriname', continent: 'South America' },
  SVK: { country: 'Slovakia', continent: 'Europe' },
  SVN: { country: 'Slovenia', continent: 'Europe' },
  SWE: { country: 'Sweden', continent: 'Europe' },
  SWZ: { country: 'Eswatini', continent: 'Africa' },
  SXM: { country: 'Sint Maarten (Dutch part)', continent: 'North America' },
  SYC: { country: 'Seychelles', continent: 'Africa' },
  SYR: { country: 'Syria', continent: 'Asia' },
  TCA: { country: 'Turks and Caicos Islands', continent: 'North America' },
  TCD: { country: 'Chad', continent: 'Africa' },
  TGO: { country: 'Togo', continent: 'Africa' },
  THA: { country: 'Thailand', continent: 'Asia' },
  TJK: { country: 'Tajikistan', continent: 'Asia' },
  TKL: { country: 'Tokelau', continent: 'Oceania' },
  TKM: { country: 'Turkmenistan', continent: 'Asia' },
  TLS: { country: 'Timor-Leste', continent: 'Asia' },
  TON: { country: 'Tonga', continent: 'Oceania' },
  TTO: { country: 'Trinidad and Tobago', continent: 'North America' },
  TUN: { country: 'Tunisia', continent: 'Africa' },
  TUR: { country: 'Turkiye', continent: 'Asia' },
  TUV: { country: 'Tuvalu', continent: 'Oceania' },
  TWN: { country: 'Taiwan', continent: 'Asia' },
  TZA: { country: 'Tanzania', continent: 'Africa' },
  UGA: { country: 'Uganda', continent: 'Africa' },
  UKR: { country: 'Ukraine', continent: 'Europe' },
  URY: { country: 'Uruguay', continent: 'South America' },
  USA: { country: 'United States', continent: 'North America' },
  UZB: { country: 'Uzbekistan', continent: 'Asia' },
  VCT: { country: 'St. Vincent and the Grenadines', continent: 'North America' },
  VEN: { country: 'Venezuela', continent: 'South America' },
  VIR: { country: 'Virgin Islands (U.S.)', continent: 'North America' },
  VNM: { country: 'Viet Nam', continent: 'Asia' },
  VUT: { country: 'Vanuatu', continent: 'Oceania' },
  WSM: { country: 'Samoa', continent: 'Oceania' },
  XKX: { country: 'Kosovo', continent: 'Europe' },
  YEM: { country: 'Yemen, Rep.', continent: 'Asia' },
  ZAF: { country: 'South Africa', continent: 'Africa' },
  ZMB: { country: 'Zambia', continent: 'Africa' },
  ZWE: { country: 'Zimbabwe', continent: 'Africa' },
};

export const countriesInContinent = Object.entries(countryData).reduce(
  (acc, [code, { continent }]) => ({
    ...acc,
    [continent]: [...(acc[continent] ?? []), code],
  }),
  {},
);

export const oecdCountries = [
  'AUS',
  'AUT',
  'BEL',
  'CAN',
  'CHL',
  'COL',
  'CRI',
  'CZE',
  'DNK',
  'EST',
  'FIN',
  'FRA',
  'DEU',
  'GRC',
  'HUN',
  'ISL',
  'IRL',
  'ISR',
  'ITA',
  'JPN',
  'KOR',
  'LVA',
  'LTU',
  'LUX',
  'MEX',
  'NLD',
  'NZL',
  'NOR',
  'POL',
  'PRT',
  'SVK',
  'SVN',
  'ESP',
  'SWE',
  'CHE',
  'TUR',
  'GBR',
  'USA',
];

export const flags = {
  BEL: '🇧🇪',
  CHE: '🇨🇭',
  DEU: '🇩🇪',
  DNK: '🇩🇰',
  ESP: '🇪🇸',
  FRA: '🇫🇷',
  ITA: '🇮🇹',
  NOR: '🇳🇴',
  POL: '🇵🇱',
  PRT: '🇵🇹',
  SWE: '🇸🇪',
};
